<?php
class pageRegister extends BasePage{
	
	public function draw(){
		$userObj = F::get()->loader('Users', $columnID = null, $load = false, $column = 'id');
		
		$token = F::get()->Auth()->createSessionToken($userObj->getFormKey());
		
		
		$dataFrom = F::get()->DataTypeForms();
		$dataFrom->addButtons();
		$dataFrom->add('Name','name');
		$dataFrom->add('Username','username');
		$dataFrom->add('Password','password');
		$dataFrom->draw('edit', 'insert', $userObj, $token);
		
		//TODO Redirect on inline forms ( need to be able to set redirects ) 
		
		//TODO Make this form submit through ajax ...All forms will work like this 
		//TODO Make controll groups into a function like datatype
		//TODO Need a better way to build forms
		
		echo($html);
	}
	
	public function post(){
		
	}
}

?>
